<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>

    <div id="app1">

    </div>


    <div id="app2">
        {{mtitle}}
        <button type="button" @click="showVueObject">点我</button>
    </div>

</body>
<script>
    var data = {
        mtitle:"hello js"
    }

    var v2 = new Vue({
        el:"#app2",
        data:data,
        methods:{
            showVueObject:function () {
                console.log(v1)
            }
        }
    })

    var v1 = new Vue({
        el:"#app1",
        data:{
            title:"vuetitle"
        }
    })
</script>
</html>